package com.liu.manager.mapper;

import com.liu.manager.entity.SysRoler;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SysrolerMapper {

    @Insert("insert into sysroler(rolename,rolegroup_id,parent_id,create_time,update_time,status) values(#{roleName},#{rolegroupId},#{parentId},#{createTime},#{updateTime},#{status})")
    @Options(useGeneratedKeys = true,keyProperty = "id",keyColumn = "id")
    int insertRoler(SysRoler sysRoler);

    @Delete("delete from sysroler where id=#{id}")
    int deleteRoler(long id);

    @Select("select * from sysroler")
    List<SysRoler> getSysrolers();

    @Select("select * from sysroler where id=#{id}")
    SysRoler findById(long id);
}
